using System;
using System.Collections.Generic;
using System.Configuration;
using System.Data;
using System.Data.SqlClient;
using System.Text;
using MeetingRoom.Data.Implementation;
using MeetingRoom.Domain;
using NUnit.Framework;

namespace MeetingRoom.UnitTest
{
    [TestFixture]
    public class SimpleScheduleDataQueryTest
    {
        protected SimpleScheduleDataQuery objectUnderTest = null;

        public SimpleScheduleDataQueryTest()
        {
            this.objectUnderTest = new SimpleScheduleDataQuery();
            SqlConnection connection = new SqlConnection(
                ConfigurationSettings.AppSettings["connectionString"]);
            this.objectUnderTest.Connection = connection;
        }

        [Test]
        public void TestGetSchedulesByMinutes()
        {
            List<Schedule> list = this.objectUnderTest.GetSchedules(DateTime.Now, 5);
            Assert.AreEqual(1, list.Count);
        }
    }
}
